﻿using System.Windows;
using System.Windows.Controls;

namespace jSLCore.Client.Presentation.Controls
{
    public partial class jSplashScreen : UserControl, ISplashScreen
    {
        public jSplashScreen()
        {
            InitializeComponent();
        }

        public bool IsBusy
        {
            get { return loading.Visibility == Visibility.Visible; }
            set {
                loading.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
                if(value)
                loading.Start();
                else
                {
                    loading.Stop();
                }
            }
        }

        public object HeaderContent
        {
            get { return loadingContent.Content; }
            set { loadingContent.Content = value; }
        }
    }
}
